<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>简历分析结果 - AI助手</title>
    <!-- Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
    <!-- Bootstrap Icons -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css" rel="stylesheet">
    
    <!-- JavaScript -->
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
    <script src="/js/main.js"></script>
    <style>
        /* CSS变量定义 */
        :root {
            --primary-gradient: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
            --primary-color: #4e73df;
            --secondary-color: #224abe;
            --success-color: #1cc88a;
            --danger-color: #e74a3b;
            --warning-color: #f6c23e;
            --info-color: #36b9cc;
            --text-color: #333;
            --text-muted: #6c757d;
            --white: #ffffff;
            --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
            --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.05);
            --shadow-lg: 0 15px 30px rgba(0, 0, 0, 0.1);
            --border-radius: 12px;
        }
        
        /* 基础样式 */
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            background-color: #f8f9fa;
            min-height: 100vh;
            margin: 0;
            display: flex;
            flex-direction: column;
        }
        
        /* 导航栏样式 */
        .navbar {
            background: var(--primary-gradient);
            box-shadow: var(--shadow-md);
            position: sticky;
            top: 0;
            z-index: 1030;
            transition: all 0.3s ease;
        }
        
        .navbar:hover {
            box-shadow: var(--shadow-lg);
        }
        
        .navbar-brand {
            font-weight: 700;
            font-size: 1.25rem;
            transition: transform 0.3s ease;
        }
        
        .navbar-brand:hover {
            transform: scale(1.05);
        }
        
        .nav-link {
            color: rgba(255, 255, 255, 0.9) !important;
            font-weight: 500;
            position: relative;
            transition: all 0.3s ease;
            padding: 0.5rem 1rem;
        }
        
        .nav-link:hover {
            color: var(--white) !important;
            transform: translateY(-2px);
        }
        
        .nav-link::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 2px;
            background-color: var(--white);
            transition: width 0.3s ease;
        }
        
        .nav-link:hover::after,
        .nav-link.active::after {
            width: 80%;
        }
        
        .nav-link.active {
            color: var(--white) !important;
            font-weight: 600;
        }
        
        /* 主内容区样式 */
        .container {
            flex: 1;
            padding-top: 2rem;
            padding-bottom: 2rem;
        }
        
        /* 卡片样式 */
        .card {
            border-radius: var(--border-radius);
            box-shadow: var(--shadow-lg);
            overflow: hidden;
            border: none;
            transition: all 0.3s ease;
            margin-bottom: 2rem;
        }
        
        .card:hover {
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
            transform: translateY(-5px);
        }
        
        .card-header {
            background: var(--primary-gradient);
            color: var(--white);
            padding: 1.5rem;
            border-radius: var(--border-radius) var(--border-radius) 0 0;
            position: relative;
            overflow: hidden;
        }
        
        .card-header::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(45deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
            transform: rotate(45deg);
            animation: shimmer 3s infinite;
        }
        
        @keyframes shimmer {
            0% {
                transform: rotate(45deg) translateX(-100%);
            }
            100% {
                transform: rotate(45deg) translateX(100%);
            }
        }
        
        .card-body {
            padding: 2rem;
            background-color: var(--white);
        }
        
        /* 分析结果卡片样式 */
        .analysis-card {
            margin-bottom: 1.5rem;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            overflow: hidden;
            transition: all 0.3s ease;
        }
        
        .analysis-card:hover {
            box-shadow: var(--shadow-md);
            transform: translateY(-2px);
        }
        
        .analysis-card-header {
            background-color: #f8fafc;
            padding: 1rem 1.5rem;
            border-bottom: 1px solid #e2e8f0;
            font-weight: 600;
            color: var(--text-color);
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        
        .analysis-card-body {
            padding: 1.5rem;
            color: var(--text-color);
            line-height: 1.6;
        }
        
        /* 评分样式 */
        .score-container {
            background: var(--primary-gradient);
            color: var(--white);
            padding: 2rem;
            border-radius: var(--border-radius);
            text-align: center;
            margin-bottom: 2rem;
            box-shadow: var(--shadow-md);
        }
        
        .score-value {
            font-size: 3rem;
            font-weight: bold;
            margin-bottom: 0.5rem;
        }
        
        .score-label {
            font-size: 1.25rem;
            opacity: 0.9;
        }
        
        /* 按钮样式 */
        .btn-primary {
            background: var(--primary-gradient);
            border: none;
            border-radius: 8px;
            padding: 0.75rem 1.5rem;
            font-weight: 600;
            font-size: 1rem;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            position: relative;
            overflow: hidden;
        }
        
        .btn-primary::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
            transition: all 0.5s ease;
        }
        
        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(78, 115, 223, 0.3);
            background: linear-gradient(135deg, #224abe 0%, #4e73df 100%);
        }
        
        .btn-primary:hover::before {
            left: 100%;
        }
        
        .btn-primary:active {
            transform: translateY(0);
        }
        
        /* 提示框样式 */
        .alert {
            border-radius: 8px;
            padding: 1rem;
            margin-bottom: 1.5rem;
            border: none;
            box-shadow: var(--shadow-sm);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .alert i {
            flex-shrink: 0;
        }
        
        /* 页脚样式 */
        footer {
            background-color: #343a40;
            color: var(--white);
            padding: 2rem 0;
            margin-top: auto;
        }
        
        /* 动画 */
        .fade-in {
            animation: fadeIn 0.8s ease-in-out;
            opacity: 0;
            animation-fill-mode: forwards;
        }
        
        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        /* 响应式设计 */
        @media (max-width: 992px) {
            .navbar-nav {
                margin-top: 1rem;
            }
            
            .card {
                margin-bottom: 1.5rem;
            }
            
            .card-body {
                padding: 1.5rem;
            }
        }
        
        @media (max-width: 576px) {
            .container {
                padding-top: 1rem;
                padding-bottom: 1rem;
            }
            
            .card-body {
                padding: 1rem;
            }
            
            .score-value {
                font-size: 2rem;
            }
        }
    </style>
</head>
<body>
    <!-- 导航栏 -->
    <nav class="navbar navbar-expand-lg navbar-dark shadow-lg">
        <div class="container">
            <a class="navbar-brand font-weight-bold" href="/home">
                <i class="bi bi-robot mr-2"></i>AI面试助手
            </a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav ms-auto">
                    <li class="nav-item">
                        <a class="nav-link" href="/home">
                            <i class="bi bi-house-door mr-1"></i> 首页
                        </a>
                    </li>
                    <li class="nav-item active">
                        <a class="nav-link" href="/resume/analysis">
                            <i class="bi bi-file-text mr-1"></i> 简历分析
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="/interview/prepare">
                            <i class="bi bi-play-circle mr-1"></i> 开始面试
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="/interview/history">
                            <i class="bi bi-clock-history mr-1"></i> 面试历史
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="/user/management">
                            <i class="bi bi-people mr-1"></i> 用户管理
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="/logout">
                            <i class="bi bi-box-arrow-right mr-1"></i> 退出登录
                        </a>
                    </li>
                </ul>
            </div>
        </div>
    </nav>

    <!-- 主内容区 -->
    <div class="container">
        <div class="row justify-content-center mb-6">
            <div class="col-lg-8 col-md-10">
                <!-- 简历分析结果卡片 -->
                <div class="card fade-in">
                    <div class="card-header">
                        <h2 class="mb-0 text-center">
                            <i class="bi bi-chart-line mr-2"></i> 简历分析结果
                        </h2>
                    </div>
                    <div class="card-body">
                        <!-- 评分展示 -->
                        <div class="score-container mb-6">
                            <div class="score-value" th:text="${resumeAnalysis.score}">85</div>
                            <div class="score-label">简历综合评分</div>
                        </div>
                        
                        <!-- 总体评价 -->
                        <div class="analysis-card mb-4">
                            <div class="analysis-card-header">
                                <i class="bi bi-star"></i>
                                <span>总体评价</span>
                            </div>
                            <div class="analysis-card-body" th:text="${resumeAnalysis.summary}">
                                您的简历内容丰富，结构清晰，涵盖了必要的个人信息、教育背景、工作经历和技能。整体来看，这份简历能够很好地展示您的专业能力和工作经验，适合应聘相关岗位。
                            </div>
                        </div>
                        
                        <!-- 优势 -->
                        <div class="analysis-card mb-4">
                            <div class="analysis-card-header">
                                <i class="bi bi-hand-thumbs-up"></i>
                                <span>优势</span>
                            </div>
                            <div class="analysis-card-body" th:text="${resumeAnalysis.strengths}">
                                1. 工作经验丰富，有多个相关项目的实战经历；
                                2. 技能栈全面，涵盖了岗位所需的主要技术；
                                3. 教育背景与岗位匹配度高；
                                4. 简历结构清晰，重点突出。
                            </div>
                        </div>
                        
                        <!-- 需要改进的地方 -->
                        <div class="analysis-card mb-4">
                            <div class="analysis-card-header">
                                <i class="bi bi-exclamation-circle"></i>
                                <span>需要改进的地方</span>
                            </div>
                            <div class="analysis-card-body" th:text="${resumeAnalysis.areasForImprovement}">
                                1. 部分项目描述过于简单，缺乏具体成果和数据支持；
                                2. 技能描述可以更具体，加入熟练度指标；
                                3. 可以增加个人项目或开源贡献的描述；
                                4. 格式上可以进一步优化，使重点内容更加突出。
                            </div>
                        </div>
                        
                        <!-- 具体改进建议 -->
                        <div class="analysis-card mb-4">
                            <div class="analysis-card-header">
                                <i class="bi bi-lightbulb"></i>
                                <span>具体改进建议</span>
                            </div>
                            <div class="analysis-card-body" th:text="${resumeAnalysis.suggestions}">
                                1. 使用STAR法则（情境、任务、行动、结果）来详细描述项目经历，重点突出您在项目中的具体贡献和取得的成果；
                                2. 为技能添加熟练度等级（如：精通、熟练、了解），并突出与目标岗位最相关的技能；
                                3. 如果有个人项目或开源贡献，可以详细描述项目背景、您的角色、使用的技术和取得的成果；
                                4. 优化简历排版，使用适当的字体大小、颜色和间距来突出重点内容。
                            </div>
                        </div>
                        
                        <!-- 格式优化建议 -->
                        <div class="analysis-card mb-6">
                            <div class="analysis-card-header">
                                <i class="bi bi-layout"></i>
                                <span>格式优化建议</span>
                            </div>
                            <div class="analysis-card-body" th:text="${resumeAnalysis.formattingTips}">
                                1. 保持简历长度在1-2页，突出重点内容；
                                2. 使用一致的字体和格式，建议使用Arial、Calibri或Times New Roman等专业字体；
                                3. 使用适当的空白和分隔符来提高可读性；
                                4. 为不同部分使用清晰的标题和小标题；
                                5. 考虑使用简历模板来提高专业度和美观度。
                            </div>
                        </div>
                        
                        <!-- 操作按钮 -->
                        <div class="text-center">
                            <a href="/resume/analysis" class="btn btn-primary mr-2">
                                <i class="bi bi-rotate-right mr-2"></i> 重新分析
                            </a>
                            <a href="/interview/prepare" class="btn btn-primary">
                                <i class="bi bi-play-circle mr-2"></i> 开始面试
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 页脚 -->
    <footer>
        <div class="container">
            <div class="row">
                <div class="col-12 text-center">
                    <p class="mb-2">&copy; 2023 AI面试助手. 保留所有权利。</p>
                </div>
            </div>
        </div>
    </footer>

    <!-- 脚本 -->
    <script>
        // 添加页面加载动画
        document.addEventListener('DOMContentLoaded', function() {
            const fadeElements = document.querySelectorAll('.fade-in');
            fadeElements.forEach((el, index) => {
                el.style.animationDelay = `${index * 0.1}s`;
                el.style.opacity = '0';
            });
        });
    </script>
</body>
</html>